<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="/">
<!-- 下拉框 -->
<link rel="stylesheet" href="static/ace/css/chosen.css" />
<!-- jsp文件头和头部 -->
<%@ include file="../index/top.jsp"%>
</head>
<body class="no-skin">
	<!-- /section:basics/navbar.layout -->
	<div class="main-container" id="main-container">
		<!-- /section:basics/sidebar -->
		<div class="main-content">
			<div class="main-content-inner">
				<div class="page-content">
					<div class="row">
						<div class="col-xs-12">
								<form action="activityLabel/${msg }.do" name="activityLabelForm" id="activityLabelForm" method="post">
									<div id="zhongxin" style="padding-top: 13px;">
									<input type="hidden" id="code" name="code" value="${code}" />
									<table id="table_report" class="table table-striped table-bordered table-hover">
										<tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">活动标签编码:</td> <!-- onchange="hasN()" -->
											<td><input type="text" name="labelCode" id="labelCode" value="${activityLabel.labelCode}" maxlength="32" placeholder="这里输入活动标签编码" title="活动标签编码"  style="width:98%;"/></td>
										</tr>
										<tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">活动标签名字:</td>
											<td><input type="text" name="labelName" id="labelName" value="${activityLabel.labelName}" maxlength="32" placeholder="这里输入活动标签名字" title="活动标签名字"  style="width:98%;"/></td>
										</tr>
										<tr>
                                        	<td style="width: 85px; text-align: right; padding-top: 15px;">活动图标(认养列表):</td>
                                        	<td><a href="javascript:void(0)" class="onePicUpload">上传图片</a> <c:if test="${not empty activityLabel.labelPicList}">
                                            	<a href='${activityLabel.labelPicList }' target='_blank'><img src='${activityLabel.labelPicList }' width='80' height='50'/></a></c:if> 
                                            	<input type="hidden" name="labelPicList" id="labelPicList"  value="${activityLabel.labelPicList }" width='80' height='50'/>
                                            </td>
                                    	</tr>
                                    	<tr>
                                        	<td style="width: 85px; text-align: right; padding-top: 15px;">活动图标(认养大厅):</td>
                                        	<td><a href="javascript:void(0)" class="onePicUpload">上传图片</a> <c:if test="${not empty activityLabel.labelPicHall}">
                                            	<a href='${activityLabel.labelPicHall }' target='_blank'><img src='${activityLabel.labelPicHall }' width='80' height='50'/></a></c:if> 
                                            	<input type="hidden" name="labelPicHall" id="labelPicHall"  value="${activityLabel.labelPicHall }" width='80' height='50'/>
                                            </td>
                                    	</tr>
										<%-- <tr>
											<td style="width:79px;text-align: right;padding-top: 13px;">活动图标(认养大厅):</td>
											<td><input type="text" name="labelPicHall" id="labelPicHall" value="${activityLabel.labelPicHall}" maxlength="32" placeholder="这里输入活动图标" title="活动图标" style="width:98%;"/></td>
										</tr> --%>
									</table>
									<table id="table_report1" class="table table-striped table-bordered table-hover">										
										<tr>
											<td style="text-align: center;" colspan="10">
												<a class="btn btn-mini btn-primary" onclick="save();">保存</a>								
												<a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
											</td>
										</tr>
									</table>
									</div>
									<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green"></h4></div>
								</form>
						</div>
						<!-- /.col -->
					</div>
					<!-- /.row -->
				</div>
				<!-- /.page-content -->
			</div>
		</div>
		<!-- /.main-content -->
	</div>
	<!-- /.main-container -->
	<!-- basic scripts -->
	<!-- 页面底部js¨ -->
	<%@ include file="../index/foot.jsp"%>
	<!-- ace scripts -->
	<script src="static/ace/js/ace/ace.js"></script>
	<!-- inline scripts related to this page -->
	<!-- 下拉框 -->
	<script src="static/ace/js/chosen.jquery.js"></script>
	<!--提示框-->
	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
	
	<script type="text/javascript" src="static/js/common/file_upload.js"></script>
	<script type="text/javascript" src="plugins/kindeditor/kindeditor-all.js"></script>
	<script type="text/javascript" src="plugins/kindeditor/lang/zh_CN.js"></script>
</body>
<script type="text/javascript">
	$(top.hangge());
	//保存
	function save(){
		if($("#labelCode").val()==""){
			$("#labelCode").tips({
				side:3,
	            msg:'请输入活动标签编码',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#labelCode").focus();
			return false;
		}else{
			$("#labelCode").val($.trim($("#labelCode").val()));
		}
		if($.trim($("#labelName").val())==""){
			$("#labelName").tips({
				side:3,
	            msg:'输入活动标签名字',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#labelName").focus();
			return false;
		}else{
			$("#labelName").val($.trim($("#labelName").val()));
		}
		$("#activityLabelForm").submit();
		$("#zhongxin").hide();
	    $("#zhongxin2").show(); 
	}
	$(function () {
    //创建富文本编辑器
    TAOTAO.kingEditorParams = {
        //指定上传文件参数名称
        filePostName: "uploadFile",
        //指定上传文件请求的url。
        uploadJson: '<%=basePath%>pic/upload',
        //上传类型，分别为image、flash、media、file
        dir: "image",
        extraFileUploadParams: {isCom: "01", width: 50, height: 50, quality: 0.8, end: "view"}
    }

    TAOTAO.kingEditorAutoParams = {
        //指定上传文件参数名称
        filePostName: "uploadFile",
        //指定上传文件请求的url。
        uploadJson: '<%=basePath%>pic/upload',
        //上传类型，分别为image、flash、media、file
        dir: "image",
        extraFileUploadParams: {isCom: "01", width: 50, height: 50, quality: 1, end: "thumb"}
    }

    goodsAddEditor = TAOTAO.createEditor("#activityLabelForm [name=content]");
    //初始化类目选择和图片上传器
    /* TAOTAO.initPicUpload($("input[name=picture]").val()); */
    TAOTAO.initOnePicUpload($("input[name=labelPicHall]").val());
});
</script>
</html>